import React from 'react';
import { connect } from 'dva'
import styles from './weekly.less'
import weeklyImg from '@/assets/image/dtimage/weekly.png'
import downIcon from '../../assets/image/xl.svg'

class Weekly extends React.Component {
  render() {
    const { joinProjectCount, workPersonDay, overtimePersonDay } = this.props
    return (
      <div className={styles.bg}>
        <img className={styles.downIcon} src={downIcon} alt='' />
        <div className={styles.box}>
          <div className={styles.textBox1}>
            <div>据2019年的周报数据显示</div>
            <div>你共投身于<span className={styles.textColor}>{joinProjectCount || ''}</span>个项目</div>
            <div>总计投入了<span className={styles.textColor}>{workPersonDay || ''}</span>人日</div>
            <div>其中加班<span className={styles.textColor}>{Number(overtimePersonDay || '').toFixed(1)}</span>人日</div>
          </div>
        </div>
        <div className={styles.textBox2}>
          <div>忙碌的时候，</div>
          <div>也请不要忘记照顾好自己的身体～</div>
        </div>
        <div className={styles.imgBox}>
          <img className={styles.img} src={weeklyImg} alt=""></img>
        </div>
      </div>
    )
  }
}

export default connect(({ index }) => index.weekly)(Weekly)